:root {
  --color-canvas-default: #ffffff;
  --color-canvas-subtle: #f6f8fa;
  --color-border-default: #d0d7de;
  --color-border-muted: hsla(210, 18%, 87%, 1);
}

.markdown {
  font-size: 14px;

  h1,
  h2,
  h3 {
    font-weight: bold;
    margin-top: 30px;

    &:first-child {
      margin-top: 0;
    }
  }

  h1,
  h2 {
    letter-spacing: -0.01em;
  }

  h1 {
    font-size: 2em;
    margin-bottom: 25px;
  }

  h2 {
    font-size: 1.5em;
  }

  h3 {
    font-size: 1.2em;
  }

  p {
    margin-bottom: 20px;
  }

  h1,
  h2,
  h3,
  pre,
  ol,
  ul {
    margin-bottom: 16px;
  }

  pre {
    border-radius: 5px;
    padding: 16px;
    max-width: 100%;
    word-break: break-all;
    white-space: pre-wrap;
  }

  code {
    background: rgb(246, 247, 248);
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.6px;
  }

  table {
    border-spacing: 0;
    border-collapse: collapse;
    display: block;
    margin-top: 0;
    margin-bottom: 16px;
    width: fit-content;
    max-width: 100%;
    overflow: auto;
  }

  tr {
    background-color: var(--color-canvas-default);
    border-top: 1px solid var(--color-border-muted);
  }

  tr:nth-child(2n) {
    background-color: var(--color-canvas-subtle);
  }

  td,
  th {
    padding: 6px 13px;
    border: 1px solid var(--color-border-default);
  }

  th {
    font-weight: 600;
  }

  table img {
    background-color: transparent;
  }
}

.markdown.markdown-without-margin {
  p {
    margin-bottom: 0;
  }
}
